package annotation.project;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collections;

public class Test {

    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        Calculator calculator = CalculatorProxy.getCalculator(new MyCalculator());
        calculator.add((Integer) 2,(Integer) 0);

//
//        MyCalculator myCalculator = new MyCalculator();
//        Class<Calculator> calculatorClass = Calculator.class;
//        Method sub = calculatorClass.getMethod("sub", Integer.class, Integer.class);
//        sub.invoke(myCalculator,2,4);
//        System.out.println(calculatorClass.isAnnotationPresent(Check.class));



    }
}
